<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.photo_Page{margin:10px 0px;height: 170px;}
			.photo_Page dt{height:80%;background: #3498DB;transition: all 1s;}
			.photo_Page dt:hover{background: #3CF;}
			.photo_Page dt img{width: 100%;height: 100%;background: white;border-radius: 5px;}
			.photo_Page dd{height:16%;background: #F1C40F;text-align: center;font-size: 1.5rem;font-weight: bold;border-radius:20px;}
			.positionRight{position: absolute;right:0px;font-size: 12px;background:rgba(0,0,0,0.4) !important}
			.createDate{top:40px;}
			.photonumber{top:8px}
			.btnupdate{position: absolute;left:0px;bottom: 45px;}
			.deletePhotosort{bottom: 80px;}
			.hoverView{display: none;}
		</style>
	</head>
	
	<body >	
	<h6><kbd>&nbsp;相册管理&nbsp;</kbd></h6>
	<form action="{:U('Photos/upload')}" method="POST" class="alert alert-info">
	<select name="photosort" class="form-control select-inverse-dropdown" >
					<foreach name="photos" item="p">
						<option value="{$p.id}">{$p.name}</option>
					</foreach>
	</select><a href="{:U('Photos/create')}" class="btn btn-danger btn-sm pull-right">创建相册</a>

	<input type="submit"class="btn btn-danger btn-xs"  value="上传图片" /></form>
<p></p>
			<div class="alert alert-info">
				<foreach name="photos" item="p">
						<dl title="{$p.description}" class="photo_Page col-lg-3">
						<dt class="thumbnail dtImg">
						<a href="{:U('Photos/view',array(id=>$p['id']))}">
								<img src="__IMGS__/photo_images/{$p.id}/{$p.cover}"  alt="{$p.description}" /></dt></a>
						<dd><a href="{:U('Photos/view',array(id=>$p['id']))}">{$p.name}</a></dd>
						<kbd class="positionRight photonumber hoverView">状态:{$p['visible']=="y"?"可见":"隐藏"}</kbd>
						<kbd class="positionRight createDate hoverView">Date:{$p.date|date="Y-m-d",###}</kbd>
						<a  onclick="ShowDialog(this)" data-url="{:U(MODULE_NAME.'/Photos/deletePhotosort',array(id=>$p['id']))}"  class=" btn-xs btn btn-danger btnupdate deletePhotosort hoverView" >删除</a>
						<a href="{:U('Photos/create',array(id=>$p['id']))}" class="btn btn-danger btn-xs btnupdate hoverView">修改相册</a>
				</dl>
				</foreach>
					<p style="clear: both;"></p>
			</div>
	
	    {:W('Modal/dialog',array("删除提示","要删除相册必须先删除相册下的图片你确定要删除嘛？"))}
      	<script src="__PUBLIC__/js/dialogHandle.js"></script>
	<script>	
		$('.photo_Page').hover(function()
		{
			$(this).find('.hoverView').stop();
			$(this).find('.hoverView').fadeToggle();
		})
	</script>
	</body>		

</html>
